<configuration>
    <property name="LOG_FILE" value="./logs/log.txt" />

    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d [%thread] %-5level  %logger{35} - %msg%n</pattern>
        </encoder>
    </appender>

    <appender name="ROLLIN" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${LOG_FILE}</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <!-- daily rollover -->
            <fileNamePattern>${LOG_FILE}.%d.gz</fileNamePattern>

            <!-- keep 7 days' worth of history capped at 50MB total size -->
            <maxHistory>14</maxHistory>
            <totalSizeCap>50MB</totalSizeCap>
        </rollingPolicy>

        <encoder>
            <pattern>%d [%thread] %-5level %logger{35} - %msg%n</pattern>
        </encoder>
    </appender>

    <root level="INFO">
        <appender-ref ref="CONSOLE" />
        <appender-ref ref="ROLLIN" />
    </root>

    <jmxConfigurator/>
</configuration>